home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
cat3
/
InternAtom.3
< prev
next >
Wrap
Text File
|
1994-09-20
|
2KB
|
67 lines
Tk_InternAtom(3) Tk Library Procedures
_________________________________________________________________
NAME
Tk_InternAtom, Tk_GetAtomName - manage cache of X atoms
SYNOPSIS
#include <tk.h>
Atom
Tk_InternAtom(_t_k_w_i_n, _n_a_m_e)
char *
Tk_GetAtomName(_t_k_w_i_n, _a_t_o_m)
ARGUMENTS
Tk_Window _t_k_w_i_n (in) Token for window. Used to
map atom or name relative to
a particular display.
char *_n_a_m_e (in) String name for which atom is
desired.
Atom _a_t_o_m (in) Atom for which corresponding
string name is desired.
_________________________________________________________________
DESCRIPTION
These procedures are similar to the Xlib procedures XInter-
nAtom and XGetAtomName. Tk_InternAtom returns the atom
identifier associated with string given by _n_a_m_e; the atom
identifier is only valid for the display associated with
_t_k_w_i_n. Tk_GetAtomName returns the string associated with
_a_t_o_m on _t_k_w_i_n's display. The string returned by
Tk_GetAtomName is in Tk's storage: the caller need not free
this space when finished with the string, and the caller
should not modify the contents of the returned string. If
there is no atom _a_t_o_m on _t_k_w_i_n's display, then
Tk_GetAtomName returns the string ``?bad atom?''.
Tk caches the information returned by Tk_InternAtom and
Tk_GetAtomName so that future calls for the same information
can be serviced from the cache without contacting the
server. Thus Tk_InternAtom and Tk_GetAtomName are generally
much faster than their Xlib counterparts, and they should be
used in place of the Xlib procedures.
KEYWORDS
atom, cache, display
Tk 1